package com.starlink.model.util;

import com.starlink.model.dtomapper.MallBooksPaymentDtoMapper;
import com.starlink.model.domain.MallBooksPaymentDO;
import com.starlink.model.vo.MallBooksPaymentVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallBooksPaymentConvert {

    public static List<MallBooksPaymentVO> buildMallBooksPaymentVoList(List<MallBooksPaymentDO> mallBooksPaymentDOList) {
        if (CollectionUtils.isEmpty(mallBooksPaymentDOList)) {
            return Lists.newArrayList();
        }
        List<MallBooksPaymentVO> mallBooksPaymentVOList = new ArrayList<>();
        for (MallBooksPaymentDO mallBooksPaymentDO : mallBooksPaymentDOList) {
            mallBooksPaymentVOList.add(MallBooksPaymentDtoMapper.INSTANCE.do2VO(mallBooksPaymentDO));
        }

        return mallBooksPaymentVOList;
    }
}
